﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<OnlineMovieTicket.Model.MovieTimeTable>>" %>
<script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-1.4.2.js") %>" ></script>  
<script type="text/javascript" src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" ></script>  
<script type="text/javascript" src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" ></script>  
    <table  id="trGrid" width="600px">
        <tr>
            <td id="tdHeaderGrid">   
            <td id="tdHeaderGrid">   
                Assign Date
            </td>
             <td id="tdHeaderGrid">   
                Showing Date
            </td>
             <td id="tdHeaderGrid">   
                Start Time
            </td>
        </tr>

    <% foreach (var item in Model) { %>
    
         <tr id="tr1">
            <td id="tdBodyGrid">
                <%= Html.ActionLink("Delete", "Delete", new { id = item.MovieAssignmentID }, new { onclick = "return confirm('Do you really want to delete this product?')" })%>
            </td>         
            <td id="tdBodyGrid">
                <%= String.Format("{0:dd MMM yyyy}", item.AssignDate)%>
            </td>
            <td id="tdBodyGrid">
                <%= String.Format("{0:dd MMM yyyy}", item.ShowingDate) %>
            </td>
            <td id="tdBodyGrid">
                <%= String.Format("{0:HH:mm:ss}", item.StartTime) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <script type="text/javascript">
        $(document).ready(function () {
            $("input[name='deleteall']").click(function () {
                return confirm('Delete all selected elements?');
            }); 

        });
    </script>



